# -*- coding: utf-8 -*-
"""
Created on Mon Oct  7 19:28:43 2019

@author: XCL01
"""

'''
import os
path = 'c:'
dirs = os.lisrdir(path) linus才能用lisrdir函数
for i in dirs:
    if os.path.splitext(i)[1] == '.dll':
        print(i)
        
import glob
for filename in glob.glob(r'c:\*.dll'): 无法递归到子目录
    print(filename)
'''
import os
for (root, dirs, files) in os.walk('c:\windows'):
    files1 = '.'.join(files)
    filenames = files1.split('.')
    for i in range(len(filenames)):
        if filenames[i] == 'dll':
            print(filenames[i - 1])